package day5.HomeWork;

public class Truck extends Automobile{
    private String type;

    public Truck() {
    }

    public Truck(String brand, String plateNumber, String type) {
        super(brand, plateNumber);
        this.type = type;
    }

    @Override
    public int getRent(int days) {
        int money = 0;
        if(type=="大型"){
            money=500;
        } else if (type == "中型") {
            money = 350;
        }else {
            money = 300;
        }
        return days*money;
    }
}
